package com.study.demo.course;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * 公共类
 **/
@Component
public class SpecializedCourses {
    @Scope("prototype")
    @Bean("specializedCourse")
    public SpecializedCourse getSpecializedCourse() {
        SpecializedCourse specializedCourse = new SpecializedCourse();
        specializedCourse.setId(1);
        specializedCourse.setName("Java");
        specializedCourse.setContent("数据类型");
        return specializedCourse;
    }
}
